home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Demos / Tangent Systems / BuildSim 2.0b34.sit / BuildSim 2.0b34 / BuildSim AutoCode Support / headers / TSBuildBlock.h / TSBuildBlock.h
Encoding:
Text File  |  1997-08-12  |  2.0 KB  |  91 lines  |  [TEXT/CWIE]

  1. ////////////////////////////////
  2. //
  3. // TSBuildBlock.h
  4. //
  5. // © 1994, 1995, 1996, 1997 Tangent Systems
  6. //
  7. // All rights reserved.
  8. //
  9. // This file contains confidential and proprietary information. No Portion
  10. // of this file may be reproduced, by any means, without the written
  11. // permission of Tangent Systems
  12. //
  13. // Tangent Systems makes no representation or warranties about the suitibility of the software,
  14. // either express or implied, including but not limited to the implied warranties of merchantability,
  15. // fitness for a particular purpose, or non-infringment.
  16. //
  17. // Tangent Systems shall not be liable for any damages suffered by licensee as a result of using,
  18. // modifying or distributing this software or derivatives.
  19. //
  20. // Description:
  21.  
  22. //
  23. //
  24. // Author: John H. Shackelford, Tangent Systems
  25. // email: jshack@tangentsys.com
  26. //
  27. // Date: 1997/06/20
  28. // Version: A
  29. //
  30. // Revision History:
  31. // 1997/06/20 Revision A -     Initial Release
  32. //
  33. ////////////////////////////////    
  34.     
  35. #ifndef _TSBuildBlock_h
  36. #define _TSBuildBlock_h
  37.  
  38. #include "BSMath.h"
  39. #include "BSErrorCodes.h"
  40. #define MAX_INPUTS 20
  41.  
  42.  
  43. //typedef short bool;
  44. #ifndef TRUE
  45.     #define TRUE     1
  46.     #define FALSE     0
  47. #endif
  48.  
  49.  
  50. //class TSBuildBlock;
  51.  
  52. class TSBuildBlock
  53. {
  54. protected:
  55. // Attributes
  56.     TSBuildBlock* InputBlocks[MAX_INPUTS];
  57.     short     InputsCount;
  58.     short    MaxInputs;
  59.     Real    StartTime;
  60.     Real      Output;
  61.     Real    SampleInterval;
  62.     bool     PrintOutput;
  63.     char*    Name;
  64.  
  65. // Methods
  66.     TSBuildBlock();
  67.     ~TSBuildBlock();
  68.  
  69. public:    
  70. virtual    int connectBlock(TSBuildBlock* aBlock);
  71. virtual    int doSimInitialize();
  72. virtual    int doSimTerminate();
  73. virtual    int doSimPause();
  74. virtual    int doSimulate(Real time);
  75. short getInputsCount();
  76. void     enableOutputPrinting();
  77. void    disableOutputPrinting();
  78. void    printOutput();
  79. void setOutput(Real value);
  80. void setMaxInputs(int value);
  81. void setInputsCount(short n);
  82. void incInputsCount();
  83. void setSampleInterval(Real sInterval);
  84. void setName(char* bName, int len);
  85. char* getName();
  86. TSBuildBlock* giveNthInput(int n);
  87. Real getNthInput(int n);
  88. Real    giveOutput();
  89.             
  90. };
  91. #endif